<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:ui="http://java.sun.com/jsf/facelets">
<h:head>
	<title>WebCópias</title>
	<link rel="stylesheet" href="assets/css/styleDefault.css" />
	<link rel="shortcut icon" href="assets/image/favicon.ico"/>
</h:head>
<body>
	<p:growl id="resultMessage" showDetail="true" life="4000" />
	<p:layout fullPage="true" styleClass="container">
		<p:layoutUnit position="north" size="95" resizable="false" closable="false" collapsible="false" styleClass="header">
			<ui:include src="/form/header.xhtml"></ui:include>
		</p:layoutUnit>
		<p:layoutUnit position="west" size="200" header="Navegação" collapsible="true" styleClass="menu" style="padding:0 !important;">
			<ui:include src="/form/menu.xhtml"></ui:include> 
		</p:layoutUnit>
		<p:layoutUnit position="center" styleClass="content">
			<h:form>
			</h:form>
		</p:layoutUnit>
	</p:layout>
	<p:dialog header="Alterar Conta" widgetVar="updateAccount" resizable="false" modal="true"
		showEffect="slide" width="500">
		<h:form prependId="false">
			<h:panelGrid id="infosLivro" columns="2" style="margin-bottom:10px">
				<h:outputLabel for="updateRegistration" value="Matrícula:" />
				<p:inputText value="#{user.loggedUser.registration}" id="updateRegistration" disabled="true" />

				<h:outputLabel for="updateName" value="Nome:" />
				<p:inputText value="#{user.loggedUser.name}" id="updateName" />

				<h:outputLabel for="updatePassword" value="Senha:" />
				<p:password value="#{user.loggedUser.password}" id="updatePassword" redisplay="true"/>

				<h:outputLabel for="updateEmail" value="E-mail:" />
				<p:inputText value="#{user.loggedUser.email}" id="updateEmail" required="false" />

				<h:outputLabel for="updatePhoto" value="Foto:" />
				<p:inputText value="#{user.loggedUser.photo}" id="updatePhoto" required="false" />
				
				<f:facet name="footer">
					<p:separator/>
					<p:commandButton oncomplete="updateAccount.hide()" actionListener="#{user.selfUpdateUser}" update=":resultMessage" value="Salvar" />
				</f:facet>
			</h:panelGrid>
		</h:form>
	</p:dialog>
</body>
</html>